<template>
    <div class="Avatar" @click.stop="toOther(userId)">
        <img src="/static/images/tx.png" alt="" class="avatar" mode="aspectFill" v-if="avatar==''">
        <img :src="avatar" alt="" class="avatar" mode="aspectFill" v-else>
        <img src="/static/images/grade/icon_vip@2x.png" alt="" class="grade" v-if="isAuth==3&&isPartner==0">
        <img src="/static/images/grade/icon_partner@2x.png" alt="" class="grade" v-if="Level==1">
        <img src="/static/images/grade/icon_partner2@2x.png" alt="" class="grade" v-if="Level==2">
        <img src="/static/images/grade/icon_partner3@2x.png" alt="" class="grade" v-if="Level==3">
    </div>
</template>

<script>
export default {
    props:["avatar","Level","userId","isAuth","isPartner"],
    methods:{
        toOther(userId){
            let url="../other/main?id="+userId;
            mpvue.navigateTo({url})
        }
    }
}
</script>

<style lang="scss" scoped>
.Avatar {
    width: 45px;
    height: 45px;
    position: relative;
    margin-right:14px;
    .avatar{
        width: 45px;
        height: 45px;
        display: block;
        border-radius:50%;
        border:1px solid rgba(26,132,251,1);
    }
    .grade{
        width:14px; 
        height:14px;
        position: absolute;
        bottom: 0px;
        right: 0px;
    }
}
</style>
